package com.us.usws.support.uitls;

import java.io.Serializable;

public class FilterDto  implements Serializable {
	
	private static final long serialVersionUID = 1L;

	private String filedName;
	
	private FilterModel model;
	
	public FilterDto() {}
	
	public FilterDto(String filedName, FilterModel model) {
		super();
		this.filedName = filedName;
		this.model = model;
	}

	public String getFiledName() {
		return filedName;
	}

	public void setFiledName(String filedName) {
		this.filedName = filedName;
	}

	public FilterModel getModel() {
		return model;
	}

	public void setModel(FilterModel model) {
		this.model = model;
	}

	@Override
	public boolean equals(Object obj) {
		if(this == obj) {
			return true;
		}
		
		if(obj instanceof FilterDto) {
			if((filedName != null && filedName.equals(((FilterDto) obj).getFiledName())) 
					&& (model != null && model.equals(((FilterDto) obj).getModel()))) {
				return true;
			}
		}
		return false;
	}

	@Override
	public int hashCode() {
		return filedName.hashCode() + model.hashCode();
	}
}
